<template>
  <div class="app-container">
    <el-drawer
     size='60%'
     :append-to-body="true"
     :before-close="handleClose"
     :with-header="false"
     :wrapper-closable="true"
     :visible.sync="innerDrawer">


      <examRoomPoint :key="jgFileTimer" :examid="examid" :kkki_id="kkki_id" :changci_id='changci_id'/>
      <!-- 关闭按钮 -->

    </el-drawer>

    <el-card class="box-card">

      <el-table
        v-loading="listLoading"
        :data="list"
        element-loading-text="Loading"
        fit
        highlight-current-row
        @selection-change="handleSelectionChange"
      >
        <!-- <el-table-column type="selection" width="42" /> -->
        <el-table-column align="center" label="ID" width="80">
          <template slot-scope="scope">
            {{ scope.row.id }}
          </template>
        </el-table-column>
        <el-table-column label="科目" show-overflow-tooltip>
          <template slot-scope="scope">
              {{ scope.row.topic_info.name }}
          </template>
        </el-table-column>
        <el-table-column label="名称" show-overflow-tooltip >
          <template slot-scope="scope">
              {{ scope.row.name }}
          </template>
        </el-table-column>
        <el-table-column label="参加人数" show-overflow-tooltip >
          <template slot-scope="scope">
              {{ scope.row.people }}
          </template>
        </el-table-column>
        <el-table-column label="日期" show-overflow-tooltip >
          <template slot-scope="scope">
              {{ scope.row.date }}
          </template>
        </el-table-column>
        <el-table-column label="时间" show-overflow-tooltip>
          <template slot-scope="scope">
              {{ scope.row.start_time }} - {{ scope.row.end_time }}
          </template>
        </el-table-column>

        <el-table-column fixed="right" label="操作" min-width="150">
          <template slot-scope="scope">
            <el-button
              size="small"
              type="primary"
              @click="see(scope.$index, scope.row)"
            >
              考场信息
            </el-button>
          </template>
        </el-table-column>
      </el-table>

    </el-card>

  </div>
</template>

<script>
import { validUrl } from '@/utils/validate'
import { pointList } from '@/api/kaowu/point'
import { examRoomAdd,examRoomList,examInfoDetail,changCiList } from '@/api/kaowu/exam'
import { roomList } from '@/api/kaowu/room'
import apiArr from '@/kaowu_api'
import { getToken } from '@/utils/auth'
import '@wangeditor/editor/dist/css/style.css'
import { Editor, Toolbar } from '@wangeditor/editor-for-vue'
import { parseTime } from '@/utils/index'
import examRoomPoint from '@/views/kaowu/kaowu/examinfo/components/examRoomPoint'

export default {
  components: { Editor, Toolbar,examRoomPoint },
  name: 'examRoomPointList',
  filters: {
    timeFilter(timestamp) {
      return parseTime(timestamp, '{y}-{m}-{d} {h}:{i}')
    }
  },
  props: ['kkki_id','examid'],
  data(){
    return {
      jgFileTimer:"",
      changci_id:0,
      list:[],
      innerDrawer: false,

    }
  },
  watch: {
    is_display: {
      handler(newVal, oldVal) {
        const is_display = newVal === true ? 1 : 0;
        if (is_display != this.form.is_display) {
          this.form.is_display = is_display;
          this.submit('is_display')
        }
      },
    }
  },
  computed: {
    config() {
      return this.$store.state.config
    }
  },
  created () {

  },
  methods: {
    init(){
      const that = this
      console.log('******************78798')
      // examInfoDetail({id:this.kkki_id}).then((res)=>{
      //   this.detail = res.data.info
      // })
      changCiList({kkki_id:that.kkki_id}).then(response=>{
        console.log(response)
        that.list = response.data.list
      })
    },
    see(index, row){
      this.changci_id = row.id
      this.jgFileTimer = new Date().getTime();
      this.innerDrawer  = true

    },
    handleClose(done) {
      done();
      // this.$confirm('还有未保存的工作哦确定关闭吗？')
      //   .then(_ => {
      //     done();
      //   })
      //   .catch(_ => {});
    }



  }
}
</script>

<style lang="scss" scoped>
.package_date{
  width: 230px;
  margin-top: 10px;
  margin-bottom: 10px;
  height: 26px;
  float:right;
  ::v-deep .el-range-input{
    font-size: 12px;
  }
  ::v-deep .el-range__icon{
    line-height: 20px;
  }
  ::v-deep .el-range-separator{
    line-height: 18px;
  }
  ::v-deep .el-range__close-icon{
    line-height: 20px;
  }
}
.smalltip i {
  margin-right: 0px;
}
.smalltip{
  color:#c9c9c9;
  font-size: 12px;
}
.dial{
  position: relative;
  top:2px;
  width: 14px;
  height: 14px;
  display: inline-block;
  .disal_img{
    cursor:pointer;
    width: 14px;
    height: 14px;
    background: url('../../../../../assets/images/outbound/dial.png') no-repeat center;
  }
}
.meet{
  .box-content{
    .img{
      width: 150px;
      height:150px;
      text-align: center;
      margin-top: 40px;
      margin:0 auto;
      background: url('../../../../../assets/images/outbound/meet.png') no-repeat center;
    }
    .hu{
      text-align: center;
      margin-top: 30px;
      font-size: 15px;
      font-family: Microsoft YaHei;
      font-weight: 400;
      color: #949494;
    }
    .telephone{
      text-align: center;
      font-size: 30px;
      font-family: Microsoft YaHei;
      font-weight: bold;
      color: #333333;
      margin-top: 26px;
    }
    .company{
      text-align: center;
      margin-top:25px;
      font-size: 15px;
      font-family: Microsoft YaHei;
      font-weight: 400;
      color: #666666;
    }
    .tips{
      text-align: center;
      height: 80px;
      line-height: 80px;
      font-size: 14px;
      font-family: Microsoft YaHei;
      font-weight: 400;
      color: #959595;
    }
  }
}
.meet{
  ::v-deep .el-dialog__body{
    padding: 0px 0px 0px 0px;
    border-radius: 5px;
  }
  ::v-deep .el-dialog{
    border-radius: 16px;
  }
}
.call{
  .box-content{
    padding: 20px 30px 35px 30px;
    .advantage{
      .advantage-box{
        display: inline-block;
        width: 170px;
        .title{
          display: inline-block;
          float:left;
        }
        .img{
          display: inline-block;
          float:left;
          margin-right: 8px;
        }
      }
      margin-top: 25px;
    }
    .slogan{
      font-size: 14px;
      font-family: Microsoft YaHei;
      font-weight: 400;
      color: #FF550A;
      margin-top:24px;
    }
    .code{
      display: inline-block;
      margin-right: 30px;
      float: right;
      width: 117px;
      height: 117px;
      background: #FFFFFF;
      box-shadow: 0px 0px 5px 0px rgba(0,0,0,0.14);
      border-radius: 8px;
      padding: 10px 10px;
      img{
        width: 100%;
        height: 100%;
      }
    }
    .content{
      display: inline-block;
      float: left;
      .title1{
        font-size: 18px;
        font-family: Microsoft YaHei;
        font-weight: 400;
        color: #FF550A;
      }
      .title2{
        margin-top: 18px;
        font-size: 18px;
        font-family: Microsoft YaHei;
        font-weight: 400;
        color: #555555;
      }
      .title3{
        width: 133px;
        height: 24px;
        background: #FF6929;
        border-radius: 3px;
        text-align: center;
        line-height: 24px;
        font-size: 14px;
        font-family: Microsoft YaHei;
        font-weight: 400;
        color: #FFFFFF;
        margin-top: 23px;
      }
    }
  }
}
.call {
  ::v-deep .el-dialog__body {
    padding: 0px 0px 0px 0px;
    border-radius: 5px;
  }

  ::v-deep .el-dialog {
    border-radius: 16px;
  }
}
.overflow{
  display: inline-block;
  width: 68%;
  font-size: 14px;
  word-break: break-all;
  word-wrap: break-word;
}
.reason{
  display: inline-block;
  min-height: 60px;
}
.company_img{
  width: 100px;
  margin-right: 15px;
  height: 125px;
  position: relative;
  display: inline-block;
  .state{
    width: 100px;
    position: absolute;
    height:25px;
    font-size: 14px;
    text-align: center;
    line-height: 25px;
    bottom:15px;
    color: white;
    background: rgba(0,0,0,0.6);
  }
  .icon{
    position: absolute;
    top: 9px;
    right: -1px;
  }
  .check{
    position: absolute;
    top: 2px;
    left: 3px;
  }
}
.package_information{
  margin: 10px 20px 0px 20px;
  background: #fafcff;
  font-size: 14px;
  padding:15px;
  border-radius: 5px;
  .titles{
    margin-bottom: 16px;
    font-size: 16px;
    font-weight: 600;
    line-height: 50px;
  }
  .content{
    width: 27%;
    margin-left: 20px;
    display: inline-block;
    margin-bottom: 15px;
  }
}
.clientInfo_wrapper{
  height: calc(100vh - 194px - 52px);
  overflow-y: auto;
  padding: 10px 0;
  .title{
    font-size: 14px;
    font-weight: 600;
    line-height: 50px;
    padding: 0 6px;
    border-bottom: 1px dotted #ebeef5;
  }
  .tag{
    margin-top: 5px;
    background: #ecf5ff;
    border-color: #b3d8ff;
    display: inline-block;
    padding: 0 10px;
    height: 24px;
    border-radius: 2px;
    text-align: center;
    line-height: 24px;
    font-size: 12px;
    font-weight: 400;
    margin-right: 10px;
  }
  .clientInfo_box{
    padding:  0 30px;
  }
  .systeminfo_box{
    position: relative;
    padding:  0 30px;
  }
  .items{
    border-bottom: 1px solid #ebeef5;
  }
  .item{
    border-bottom: 1px dotted #ebeef5;
    display: flex;
    justify-content: space-between;
    .img{
      width: 250px;
      height:250px;
    }
    .info_width{
      width: 85%;
    }
    .info{
      display: flex;
      line-height: 20px;
      padding: 15px 6px;
      .auth{
        font-size: 14px;
        font-weight: 500;
        .icon_1 {
          color: #6EACE2;
        }
      }
      .clientinfo_type_1{
        color: #fe6135;
      }
      .label{
        width: 110px;
        color: #999;
        font-size: 14px;
        display: flex;
        align-items: center;
      }
      .text_width{
        width: 85%;
        .el-input{
          width: 100%;
        }
        .el-input__inner{
          padding: 0;
        }
      }
      .text{
        color: #000;
        font-size: 14px;
        .el-input{
          height: 28px;
        }
      }
    }
    .btn{
      display: flex;
      align-items: center;
    }
  }
}
.empty_texts{
  margin-bottom: 20px;
  height:100%;
  text-align: center;
  font-size: 14px;
  color:#d1cfcf;
  line-height: 30px;
}
.item_img_empty{
  margin-bottom: 20px;
  img{
    width: 120px;
    height:120px;
    margin-right: 15px;
    margin-top: 10px;
  }
}
.item_img{
  margin-bottom: 20px;
  margin-left: 116px;
  img{
    width: 120px;
    height:120px;
    margin-right: 15px;
    margin-top: 10px;
  }
}
.styles{
  border-bottom: 1px dotted #ebeef5;
}
.dial{
  position: relative;
  top:2px;
  left: 4px;
  width: 14px;
  height: 14px;
  display: inline-block;
  .disal_img{
    cursor:pointer;
    width: 14px;
    height: 14px;
    background: url('../../../../../assets/images/outbound/dial.png') no-repeat center;
  }
}
.meet{
  .box-content{
    .img{
      width: 150px;
      height:150px;
      text-align: center;
      margin-top: 40px;
      margin:0 auto;
      background: url('../../../../../assets/images/outbound/meet.png') no-repeat center;
    }
    .hu{
      text-align: center;
      margin-top: 30px;
      font-size: 15px;
      font-family: Microsoft YaHei;
      font-weight: 400;
      color: #949494;
    }
    .telephone{
      text-align: center;
      font-size: 30px;
      font-family: Microsoft YaHei;
      font-weight: bold;
      color: #333333;
      margin-top: 26px;
    }
    .company{
      text-align: center;
      margin-top:25px;
      font-size: 15px;
      font-family: Microsoft YaHei;
      font-weight: 400;
      color: #666666;
    }
    .tips{
      text-align: center;
      height: 80px;
      line-height: 80px;
      font-size: 14px;
      font-family: Microsoft YaHei;
      font-weight: 400;
      color: #959595;
    }
  }
}
.meet{
  ::v-deep .el-dialog__body{
    padding: 0px 0px 0px 0px;
    border-radius: 5px;
  }
  ::v-deep .el-dialog{
    border-radius: 16px;
  }
}
.call{
  .box-content{
    padding: 20px 30px 35px 30px;
    .advantage{
      .advantage-box{
        display: inline-block;
        width: 170px;
        .title{
          display: inline-block;
          float:left;
        }
        .img{
          display: inline-block;
          float:left;
          margin-right: 8px;
        }
      }
      margin-top: 25px;
    }
    .slogan{
      font-size: 14px;
      font-family: Microsoft YaHei;
      font-weight: 400;
      color: #FF550A;
      margin-top:24px;
    }
    .code{
      display: inline-block;
      margin-right: 30px;
      float: right;
      width: 117px;
      height: 117px;
      background: #FFFFFF;
      box-shadow: 0px 0px 5px 0px rgba(0,0,0,0.14);
      border-radius: 8px;
      padding: 10px 10px;
      img{
        width: 100%;
        height: 100%;
      }
    }
    .content{
      display: inline-block;
      float: left;
      .title1{
        font-size: 18px;
        font-family: Microsoft YaHei;
        font-weight: 400;
        color: #FF550A;
      }
      .title2{
        margin-top: 18px;
        font-size: 18px;
        font-family: Microsoft YaHei;
        font-weight: 400;
        color: #555555;
      }
      .title3{
        width: 133px;
        height: 24px;
        background: #FF6929;
        border-radius: 3px;
        text-align: center;
        line-height: 24px;
        font-size: 14px;
        font-family: Microsoft YaHei;
        font-weight: 400;
        color: #FFFFFF;
        margin-top: 23px;
      }
    }
  }
}
.call{
  ::v-deep .el-dialog__body{
    padding: 0px 0px 0px 0px;
    border-radius: 5px;
  }
  ::v-deep .el-dialog{
    border-radius: 16px;
  }
}
.item{
  border-bottom: 1px dotted #ebeef5;
  display: flex;
  justify-content: space-between;
  .img{
    width: 250px;
    height:250px;
  }
  .info_width{
    width: 85%;
  }
  .info{
    display: flex;
    line-height: 20px;
    padding: 15px 6px;
    .auth{
      font-size: 14px;
      font-weight: 500;
      .icon_1 {
        color: #6EACE2;
      }
    }
    .clientinfo_type_1{
      color: #fe6135;
    }
    .label{
      width: 110px;
      color: #999;
      font-size: 14px;
      display: flex;
      align-items: center;
    }
    .text_width{
      width: 85%;
      .el-input{
        width: 100%;
      }
      .el-input__inner{
        padding: 0;
      }
    }
    .text{
      color: #000;
      font-size: 14px;
      .el-input{
        height: 28px;
      }
    }
  }
  .btn{
    display: flex;
    align-items: center;
  }
}
.clientInfo_box{
  padding:  0 30px;
}

.audit_template_select{
  .el-select{
    width: 100% !important;
  }
}

.checkboxAddAuditTemplate{
  ::v-deep .el-checkbox__inner{
    border-radius: 50%;
  }
}

.multiline-text{
  white-space: normal;
  width: 330px;
}

.el-select-dropdown__item {
  font-size: 14px;
  padding: 0 20px;
  position: relative;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  height: auto;
  line-height: 1.5;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  &:first-child{
    margin-top: 10px;
  }
}

.item-box{
  display: flex;
  justify-content: flex-start;
  box-sizing: border-box;
  padding-left: 50px;
  align-items: baseline;
  .reason{
    min-height: initial;
    width: 70px;
    text-align: right;
  }
  .el-select{
    width: 80% !important;
  }
}
</style>
